-- @owner: opentestcase004
-- @date: 2022-12-28
-- @testpoint: 执行insert set语句,被插入字段引用取值为普通函数的字段
-- @modify: modified by zou_jialiang050 at 2024/06/21 根据最新代码优化用例

--step1:建表1,2 expect:成功
drop table if exists t_insert_set_028_01;
create table t_insert_set_028_01(c1 date, c2 date);
drop table if exists t_insert_set_028_02;
create table t_insert_set_028_02(c1 timestamp, c2 timestamp null);

--step2:执行insert values语句,被插入字段引用取值为普通函数的字段 expect:成功
insert into t_insert_set_028_01 set c1 = now(), c2 = c1;
insert into t_insert_set_028_02 set c1 = pg_systimestamp(), c2 = c1;

--step3:查询表数据 expect:表1c1和c2的取值一致,表2c1,c2取值一致
select * from t_insert_set_028_01;
select * from t_insert_set_028_02;

--step4:清理环境 expect:成功
drop table t_insert_set_028_01;
drop table t_insert_set_028_02;